package com.weixin.paleituo.bean;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * 订单发票信息
 *
 * @author fengzhen
 * @version v1.0, 2018/4/5
 */
public class OrderInvoiceBean implements Parcelable {
    private String invoiceName;//发票名
    private int type;// 1-纸质发票2-电子发票
    private int title;// 1-个人，2-单位，3-不开发票
    private int genre;// 类型1-普通发票，2-增值税发票
    private String name;// 个人姓名或者公司名字
    // 以下字段为存增值税发票使用
    private String number;// 纳税人编号(纳税人识别号)
    private String address;// 注册地址
    private String phone;// 注册电话
    private String blank;// 开户银行
    private String account;// 银行账户
    private int noticeId;// 发票须知id
    private int orderId;//订单id
    private int userId;
    // 以下字段展示详情接口使用
    private String createTime;
    private String orderNumber;

    public OrderInvoiceBean() {
    }

    protected OrderInvoiceBean(Parcel in) {
        invoiceName = in.readString();
        type = in.readInt();
        title = in.readInt();
        genre = in.readInt();
        name = in.readString();
        number = in.readString();
        address = in.readString();
        phone = in.readString();
        blank = in.readString();
        account = in.readString();
        noticeId = in.readInt();
        orderId = in.readInt();
        userId = in.readInt();
        createTime = in.readString();
        orderNumber = in.readString();
    }

    public static final Creator<OrderInvoiceBean> CREATOR = new Creator<OrderInvoiceBean>() {
        @Override
        public OrderInvoiceBean createFromParcel(Parcel in) {
            return new OrderInvoiceBean(in);
        }

        @Override
        public OrderInvoiceBean[] newArray(int size) {
            return new OrderInvoiceBean[size];
        }
    };

    public String getTime() {
        return createTime;
    }

    public void setCreateTime(String time) {
        this.createTime = time;
    }

    public String getOrderNumber() {
        return orderNumber;
    }

    public void setOrderNumber(String orderNumber) {
        this.orderNumber = orderNumber;
    }

    public String getInvoiceName() {
        return invoiceName;
    }

    public void setInvoiceName(String invoiceName) {
        this.invoiceName = invoiceName;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public int getTitle() {
        return title;
    }

    public void setTitle(int title) {
        this.title = title;
    }

    public int getGenre() {
        return genre;
    }

    public void setGenre(int genre) {
        this.genre = genre;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getNumber() {
        return number;
    }

    public void setNumber(String number) {
        this.number = number;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getBlank() {
        return blank;
    }

    public void setBlank(String blank) {
        this.blank = blank;
    }

    public String getAccount() {
        return account;
    }

    public void setAccount(String account) {
        this.account = account;
    }

    public int getNoticeId() {
        return noticeId;
    }

    public void setNoticeId(int noticeId) {
        this.noticeId = noticeId;
    }

    public int getOrderId() {
        return orderId;
    }

    public void setOrderId(int orderId) {
        this.orderId = orderId;
    }

    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(invoiceName);
        dest.writeInt(type);
        dest.writeInt(title);
        dest.writeInt(genre);
        dest.writeString(name);
        dest.writeString(number);
        dest.writeString(address);
        dest.writeString(phone);
        dest.writeString(blank);
        dest.writeString(account);
        dest.writeInt(noticeId);
        dest.writeInt(orderId);
        dest.writeInt(userId);
        dest.writeString(createTime);
        dest.writeString(orderNumber);
    }
}
